/*
 * Copyright (c) 2022  by Junzhao
 * THIS FILE IS PART OF JAVA-Data-Structures-and-Algorithms PROJECT
 * All Rights Reserved.
 */

package 冒泡;

import 工具.Unit;

/**
 * @Description 测试类
 * 实例数组 int[] arr = new int[]{25,36,45,67,83,12,43,62,78,20,48,64,78,77,56,45,32};
 * @Author 俊昭
 * @Date 2022/4/30
 */
class BubbleTest {
    public static void main(String[] args) {
        int[] arr = Unit.intArr();
//        int[] arr = new int[]{1,3,4,6,5,2,7,9,8};
//        Bubble.sort(arr);

//        int[] arr = Unit.randomArr();

        long s = System.currentTimeMillis();
        Bubble.sort(arr);
        long e = System.currentTimeMillis();
        System.out.println(e - s + "ms");// 8201ms 8160ms 8183ms 8.2秒左右


//        for (int a :Bubble.sort(arr)) {
//            System.out.print(a +" ");
//        }
//        System.out.println();
//        for (int a : Bubble.sortReversed(arr)) {
//            System.out.print(a +" ");
//        }
    }
}
